package com.kedou.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;
import com.kedou.sdk.params.bean.SimpleUserInfo;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/6/6 0006.
 */
public class AccountInfosResponseParams extends ResponseParams<AccountInfosResponseParams.AccountInfosResponseData> {

    public AccountInfosResponseParams() {

    }

    protected AccountInfosResponseParams(Parcel in) {
        super(in);
    }

    public static class AccountInfosResponseData implements Parcelable {

        public static final Creator<AccountInfosResponseData> CREATOR = new Creator<AccountInfosResponseData>() {
            @Override
            public AccountInfosResponseData createFromParcel(Parcel source) {
                return new AccountInfosResponseData(source);
            }

            @Override
            public AccountInfosResponseData[] newArray(int size) {
                return new AccountInfosResponseData[size];
            }
        };
        private String token;
        @SerializedName("list")
        private ArrayList<SimpleUserInfo> userInfoList;

        public AccountInfosResponseData() {
        }

        protected AccountInfosResponseData(Parcel in) {
            this.token = in.readString();
            this.userInfoList = in.createTypedArrayList(SimpleUserInfo.CREATOR);
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public ArrayList<SimpleUserInfo> getUserInfoList() {
            return userInfoList;
        }

        public void setUserInfoList(ArrayList<SimpleUserInfo> userInfoList) {
            this.userInfoList = userInfoList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.token);
            dest.writeTypedList(this.userInfoList);
        }
    }
}
